From: Colin Walters Date: Tue, 25 Feb 2025 18:19:27 +0000 (-0500) Subject: core: Print which xattrs are not sorted X-Git-Tag: archive/raspbian/2025.7-2+rpi1^2^2~6^2~5^2~8^2~3 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=ab9a3b02a92eda0fbed5025ff168de0ed8634dbb;p=ostree.git core: Print which xattrs are not sorted I hit this in the rpm-ostree rechunker flow somehow and with this change I now get: `error: Generating commit from rootfs: Processing dir var: Writing content object: Incorrectly sorted xattr name (prev=user.Librepo.checksum.mtime, cur=security.selinux), index=2` which is more useful, although I still need to figure out and fix why that's happening (again?). Signed-off-by: Colin Walters --- diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c index e67c23f8..4a9d68da 100644 --- a/src/libostree/ostree-core.c +++ b/src/libostree/ostree-core.c @@ -2342,7 +2342,8 @@ _ostree_validate_structureof_xattrs (GVariant *xattrs, GError **error) if (cmp == 0) return glnx_throw (error, "Duplicate xattr name, index=%d", i); else if (cmp > 0) - return glnx_throw (error, "Incorrectly sorted xattr name, index=%d", i); + return glnx_throw (error, "Incorrectly sorted xattr name (prev=%s, cur=%s), index=%d", + previous, name, i); } previous = name; i++;